import { post } from "@/utils/http";

export const getSupplierList = () => {
  return post("/api/supplier/supplier-client/api/supplierInfo/supplierlist")
}
export const addSupplier = (params) => {
  return post("/api/supplier/supplier-client/api/supplierInfo/add", params,{
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
export const updateSupplier = (params) => {
  return post("/api/supplier/supplier-client/api/supplierInfo/update", params,{
    headers: {
      'Content-Type': 'application/json'
      }
    })
}
export const deleteSupplier = (id) => {
  return post("/api/supplier/supplier-client/api/supplierInfo/delete", { }, 
    {params: { id } // 通过 params 传递查询参数
  });
};
export const searcSupplier = (keyword) => {
  return post(
    "/api/supplier/supplier-client/api/supplierInfo/searchsupplier", // 固定路径
    {}, 
    { params: { keyword } } // 查询参数：?keyword=xxx
  );
};